package wms2010.gui;

import javax.swing.tree.DefaultMutableTreeNode;

public class RunnableTreeNode extends DefaultMutableTreeNode implements Runnable {
	private Runnable runObject;
	private String caption;
	
	public RunnableTreeNode(Runnable runObject, String captino) {
		this.runObject = runObject;
		this.caption = captino;
	}

	public void run() {
		this.runObject.run();
	}
	
	@Override
	public String toString() {
		return this.caption;
	}
}
